import Vue from 'vue'
import App from './App.vue'
import navbar from '@/components/navBar.vue'
import jBtn from '@/components/jBtn.vue'
import './utils/index.js'
import 'uni.scss'
import Vuex from 'vuex'
import cart from './store/cart'
Vue.use(Vuex)
const store = new Vuex.Store({
    modules: {
      cart
    }
  })
// 初始化购物车数据
store.commit('initCart')
// 挂载到Vue实例
Vue.prototype.$store = store

import statusConst from '@/utils/statusConst'
import statusUtil from '@/utils/statusUtils'

// 挂载到Vue原型
Vue.prototype.$status = statusConst
Vue.prototype.$statusUtil = statusUtil

// 也可以挂载到uni对象
// uni.$status = statusConst
// uni.$statusUtil = statusUtil

Vue.config.productionTip = false

import CustomNavbar from '@/components/custom-navbar.vue'
Vue.component('custom-navbar', CustomNavbar)

// 自定义导航组件
Vue.component('navbar', navbar)
Vue.component('jBtn', jBtn)

new App().$mount()
